package com.sc.nft.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.PrivilegeRule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.vo.DestroyPrivilegeRuleVO;
import com.sc.nft.entity.vo.PrivilegeRuleVO;
import com.sc.nft.entity.vo.ProductRuleConsensusVO;
import com.sc.nft.entity.vo.ProductRuleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (sc_privilege_rule)数据Mapper
 *
 * @author rdg
 * @since 2022-06-28 16:01:14
 * @description 由 Mybatisplus Code Generator 创建
*/
@Mapper
public interface PrivilegeRuleMapper extends BaseMapper<PrivilegeRule> {

    List<PrivilegeRuleVO> getByProductId(@Param("id") Long id);

    Page<ProductRuleVO> getProductRule(Page page, @Param("productId") Long productId);

    List<DestroyPrivilegeRuleVO> getByProductIdAndDestory(@Param("productId") Long productId, @Param("isDestory") Boolean isDestory);

    ProductRuleConsensusVO getCollectionRuleConsensus(@Param("productId") Long productId);
}
